package com.hsq.end_of_period;

import org.junit.jupiter.api.Test;

import java.io.File;
import java.io.IOException;
import java.util.Arrays;
import java.util.Scanner;

public class Test207_2 {
    public static void main(String[] args) {
        while (true) {
            Scanner scan = new Scanner(System.in);
            char c = scan.next().charAt(0);
            if (c == '#') {
                break;
            }
            System.out.println((int)c);
        }
    }

    @Test
    public void test207_3() throws IOException {
        int[] count = new int[26];
        File file = new File("D:\\git_turtle\\news2.txt");
        Scanner scan = new Scanner(file);
        while (scan.hasNext()) {
            String str = scan.nextLine();
            for (int i = 0; i < str.length(); i ++) {
                char c = str.charAt(i);
                if (Character.isLetter(c)) {
                    int index = Character.toLowerCase(c) - 'a';
                    count[index] ++;
                }
            }
        }
        scan.close();
        for (int i = 0; i < 26; i ++) {
            char c = (char)('a' + i);
            System.out.println(c + "::" + count[i]);
        }
    }

    @Test
    public void test207_12() {
        Scanner scan = new Scanner(System.in);
        int[] a = new int[10];
        for (int i = 0; i < 10; i ++) {
            a[i] = scan.nextInt();
        }
        Arrays.sort(a);
        for (int i : a) {
            System.out.print(i + " ");
        }
    }
}
